<template>
  <div style="width: 100%; height: 90%">
    <div style="width: 100%; height: 100%" ref="weekProductRef"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {
    this.setWeekProduct();
  },
  methods: {
    setWeekProduct() {
      const myChart = this.$echarts.init(this.$refs.weekProductRef);
      const option = {
        title: {
          text: "周产量情况",
          left: "50px",
          top: "10px",
          textStyle: {
            color: "#FFF",
          },
        },
        xAxis: {
          type: "category",
          data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
        },
        yAxis: {
          type: "value",
          max: 200,
        },
        series: [
          {
            data: [50, 100, 50, 100, 50, 100, 50],
            type: "bar",
          },
        ],
      };
      myChart.setOption(option);
    },
  },
};
</script>
